package com.yunke.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;

/**
 * 文件管理实体类
 * 
 * @author yunke
 * @since 1.0.0
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("yunke_file")
@Schema(name = "YunkeFile", description = "文件管理实体")
public class YunkeFile implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.ASSIGN_ID)
    @Schema(description = "文件ID")
    private Long id;

    @Schema(description = "文件名称")
    private String fileName;

    @Schema(description = "原始文件名")
    private String originalName;

    @Schema(description = "文件扩展名")
    private String fileExt;

    @Schema(description = "文件类型（1图片 2视频 3音频 4文档 5其他）")
    private Integer fileType;

    @Schema(description = "文件大小（字节）")
    private Long fileSize;

    @Schema(description = "文件路径")
    private String filePath;

    @Schema(description = "文件URL")
    private String fileUrl;

    @Schema(description = "缩略图URL")
    private String thumbnailUrl;

    @Schema(description = "文件MD5")
    private String fileMd5;

    @Schema(description = "存储类型（1本地 2阿里云OSS 3腾讯云COS 4七牛云）")
    private Integer storageType;

    @Schema(description = "存储桶名称")
    private String bucketName;

    @Schema(description = "文件分类")
    private String fileCategory;

    @Schema(description = "业务类型")
    private String businessType;

    @Schema(description = "关联业务ID")
    private Long businessId;

    @Schema(description = "上传用户ID")
    private Long uploadUserId;

    @Schema(description = "上传用户名")
    private String uploadUserName;

    @Schema(description = "下载次数")
    private Integer downloadCount;

    @Schema(description = "访问次数")
    private Integer accessCount;

    @Schema(description = "是否公开（0否 1是）")
    private Boolean isPublic;

    @Schema(description = "是否临时文件（0否 1是）")
    private Boolean isTemp;

    @Schema(description = "过期时间")
    private Long expireTime;

    @Schema(description = "扩展信息（JSON格式）")
    private String extraInfo;

    @Schema(description = "备注")
    private String remark;

    @Schema(description = "状态（0正常 1删除）")
    private Integer status;

    @Schema(description = "创建时间")
    private Long createTime;

    @Schema(description = "更新时间")
    private Long updateTime;
} 